package com.edais.persistence;

import java.util.List;
import java.util.Map;

import com.edais.vo.LuckDraw;

public interface LuckDrawMapper {
	
	/**
	 * 查询摇一摇奖项列表
	 * @param paramMap
	 * @return
	 */
	public List<Map<String,Object>> queryLuckDrawList(Map<String,Object> paramMap);
	
	/**
	 * @Description: 获取抽奖配置信息
	 * @param @param id
	 * @param @return   
	 * @return LuckDraw  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-8-3
	 */
	public LuckDraw getLuckDraw(Long id);

	/**
	 * @Description: 特殊活动抽奖次数查询
	 * @param @param paramMap
	 * @param @return   
	 * @return Map<String,String>  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-9-2
	 */
	public Map<String, String> getSpecEvnTimes(Long userId) throws Exception;
	
	/**
	 * @Description: 特殊奖项列表
	 * @param @return   
	 * @return List<Map<String,Object>>  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-9-2
	 */
	public List<Map<String,Object>> querySpeEveDrawList() throws Exception;
	
	/**
	 * @Description: 特殊奖项单条
	 * @param @param id
	 * @param @return   
	 * @return LuckDraw  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-9-2
	 */
	public LuckDraw getSpeEveDraw(Long id) throws Exception;
	
	/**
	 * @Description: 记录特殊抽奖结果表
	 * @param @param paramMap
	 * @param @return   
	 * @return Integer  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-9-2
	 */
	public Integer insertSpecEvent(Map<String,Object> paramMap) throws Exception;
	
	/**
	 * @Description: 修改特殊抽奖次数
	 * @param @param userId
	 * @param @return
	 * @param @throws Exception   
	 * @return Integer  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-9-2
	 */
	public Integer updateSpecTimes(Long userId) throws Exception;

	/**
	 * 参与抽奖列表
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> attendSpecGiftsList() throws Exception;

	/**
	 * 
	 * @param giftId
	 * @return
	 */
	public Integer updateStore(Long giftId);
	
	/**
	 * @Description: 双旦活动抽奖次数查询
	 * @param @param userId
	 * @param @return
	 * @param @throws Exception   
	 * @return Map<String,String>  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-12-8
	 */
	public Map<String, String> getSDTimes(Long userId) throws Exception;
	
	/**
	 * @Description: 双旦奖项列表
	 * @param @return
	 * @param @throws Exception   
	 * @return List<Map<String,Object>>  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-12-8
	 */
	public List<Map<String,Object>> querySDDrawList() throws Exception;
	
	/**
	 * @Description: 双旦奖项
	 * @param @param id
	 * @param @return
	 * @param @throws Exception   
	 * @return LuckDraw  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-12-8
	 */
	public LuckDraw getSDDraw(Long id) throws Exception;
	
	/**
	 * @Description: 记录双旦抽奖结果表
	 * @param @param paramMap
	 * @param @return
	 * @param @throws Exception   
	 * @return Integer  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-12-8
	 */
	public Integer insertSDEvent(Map<String,Object> paramMap) throws Exception;
	
	/**
	 * @Description: 修改双旦抽奖次数
	 * @param @param userId
	 * @param @return
	 * @param @throws Exception   
	 * @return Integer  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-12-8
	 */
	public Integer updateSDTimes(Long userId) throws Exception;
	
	/**
	 * @Description: 参与双旦抽奖列表
	 * @param @param param
	 * @param @return
	 * @param @throws Exception   
	 * @return List<Map<String,Object>>  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-12-8
	 */
	public List<Map<String, Object>> attendSDGiftsList(Map<String,Object> param) throws Exception;
	
	/**
	 * @Description: 修改双旦库存
	 * @param @param giftId
	 * @param @return   
	 * @return Integer  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-12-8
	 */
	public Integer updateSDStore(Long giftId);

	/**
	 * @Description: 抽奖记录
	 * @param @param reqMap
	 * @param @return
	 * @param @throws Exception   
	 * @return List<Map<String,Object>>  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-12-12
	 */
	public List<Map<String, Object>> getSDLuckDrawResult(Map<String, Object> reqMap) throws Exception;

	/**
	 * @Description: 抽奖记录总数
	 * @param @param reqMap
	 * @param @return
	 * @param @throws Exception   
	 * @return int  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-12-12
	 */
	public int getSDLuckDrawResultSize(Map<String, Object> reqMap) throws Exception;

	/**
	 * @Description: 首次抽奖
	 * @param @param userId
	 * @param @return   
	 * @return int  
	 * @throws
	 * @author chenshufeng
	 * @date 2016-12-22
	 */
	public int updateSDFirstTimes(Long userId) throws Exception;
}
